f1 = open("F:\\「manga」yuri\\dmzj_info_yuri\\dmzj_info_yuri2.txt","r",encoding="utf-8")
text_lines = f1.readlines()
f1.close()
count = 0
orderlist = []
while count < 60000:
    for line in text_lines:
        str1 = line[:line.find(" ")]
        str1int = int(str1)
        if str1int == count:
            print(count)
            orderlist.append(line)
            continue
        else:
            continue
    count += 1
with open("F:\\「manga」yuri\\dmzj_info_yuri\\dmzj_info_yuri3.txt","w",encoding="utf-8") as f2:
    for line in orderlist:
        f2.write(line)
    f2.close()